package 面向对象高级.数码产品;

public class Person {
    //a.使用拨号设备use(拨号设备);
    public void use(Dailup dailup){
        dailup.dailup();
    }
    // b.使用拍照设备use(拍照设备);
    public void use(TakePhoto takePhoto){
        takePhoto.takePhoto();
    }
    // c.使用播放设备use(播放设备);
    public void use(Play play){
        play.play();
    }
    // b.使用拨号拍照播放设备use(拨号拍照播放设备);//DailupTakePhotoPlay
    public void use(DailupTakePhotoPlay dailupTakePhotoPlay){
        dailupTakePhotoPlay.dailup();
        dailupTakePhotoPlay.takePhoto();
        dailupTakePhotoPlay.play();
    }

}
